package cn.tac.framework.test;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;

/**
 * spring环境下通用的junit controller层单元测试基类
 *
 * @author : tac
 * @since : 2017/8/2
 *
 * @deprecated todo:: 未完成
 */
public abstract class GenericCtrlTestSupport extends GenericTestSupport {
    protected MockMvc mvc;

    @Autowired private WebApplicationContext webApplicationContext;
    @Autowired private ObjectMapper objectMapper;

    @Before
    public void __init__(){
        mvc = MockMvcBuilders.webAppContextSetup(webApplicationContext).build();
    }
}
